<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Santas Helper - Addresses - List</title>
	</head>
	<body>
		<header>
			<h1>Addresses</h1>
			<h2>List</h2>
		</header>
		<section>
			<table>
				<tr>
					<th>ID</th>
					<th>Text</th>
					<th></th>
					<th></th>
				</tr>
				<c:forEach items="${addresses }" var="address">
					<tr>
						<td>${address.id }</td>
						<td>${address.text }</td>
						<td>
							<c:if test="${address.id != 1 }">
								<a href="update/${address.id }">Update</a>
							</c:if>
						</td>
						<td>
							<c:if test="${address.id != 1 }">
								<a href="delete/${address.id }">Delete</a>
							</c:if>
						</td>
					</tr>
				</c:forEach>
			</table>
			<br>
			<a href="create/${child.id }">Add New</a>
			<br>
			<br>
			<br>
			<a href="../children/list">Back to list</a>
		</section>
		<footer>
			<p>&nbsp;</p>
			<p>&copy; 2012 North Pole Productions</p>
		</footer>
	</body>
</html>